import { getAccountApi } from "api/api.js";

//用户账号模糊搜索
export const getAccount = function ({ commit, state }, { fuzzyUsername }) {
  return new Promise((resolve, reject) => {
    getAccountApi({ requestData: { fuzzyUsername } }).then((res) => {
      let { data } = res;
      let arr = [];
      data?.forEach((element) => {
        if (!element.name.includes("<离职>")) {
          arr.push(element);
        }
      });
      resolve(arr || []);
    });
  });
};
